home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / fileutil / fhd210.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1996-02-05  |  7KB  |  137 lines

  1. @echo off
  2. cls
  3. echo  
  4. echo                  ┌─────────────── File_Handle ─────────────┐
  5. echo                  │                                         │
  6. echo                  │      === Hard Disk Installation ===     │
  7. echo                  │                                         │
  8. echo                  │ Copyright (c) 1995 A. van Andel, Hasoft │
  9. echo                  │           All Rights Reserved           │
  10. echo                  │                                         │
  11. echo                  │ This will install File_Handle on a dri- │
  12. echo                  │ ve and directory of your choice.        │
  13. echo                  │                                         │
  14. echo                  │ You should have entered something like: │
  15. echo                  │                                         │
  16. echo                  │           A:INSTALL A: C: FH            │
  17. echo                  │                                         │
  18. echo                  │ There must be no '\' between  the  'C:' │
  19. echo                  │ and the directory name.   The directory │
  20. echo                  │ will be created if it doesn't exist.    │
  21. echo                  │                                         │
  22. echo                  │ Press any key to CONTINUE, or Ctrl+C to │
  23. echo                  │ ABORT the installation.                 │
  24. echo                  └─────────────────────────────────────────┘
  25. pause > nul
  26.  
  27. :   If no drive letter is given, tell user how to do it.
  28.  
  29. if "%1" == "" goto FH_PATH
  30. if "%2" == "" goto FH_PATH
  31. if "%3" == "" goto FH_PATH
  32.  
  33. :   First check if the directory %3 is already there.
  34. :   Offer NOT to overwrite if it's not an old File_Handle.
  35.  
  36. if NOT EXIST %2\%3\FH.EXE goto MAKE_FH
  37. cls
  38. echo  
  39. echo           ┌─────────────────────── WARNING ───────────────────────┐
  40. echo           │                                                       │
  41. echo           │                Program Already Exists!                │
  42. echo           │                                                       │
  43. echo           │ This could mean there is already an  (older)  version │
  44. echo           │ of this program on your disk;  *BUT* it could also be │
  45. echo           │ another program by the same name.                     │
  46. echo           │                                                       │
  47. echo           │ Press Ctrl+C if you *DON'T* want to to overwrite,  or │
  48. echo           │ any other key if you want to install the new version. │
  49. echo           │                                                       │
  50. echo           └───────────────────────────────────────────────────────┘
  51. pause > nul
  52. goto COPY_FH
  53.  
  54. :   Create File_Handle's directory on the hard disk.
  55.  
  56. :MAKE_FH
  57. cls
  58. echo  
  59. echo                         ┌───────── MAKEDIR ─────────┐
  60. echo                         │                           │
  61. echo                         │ Creating the directory... │
  62. echo                         │                           │
  63. echo                         └───────────────────────────┘
  64. md %2\%3 > nul
  65.  
  66. :COPY_FH
  67. cls
  68. echo  
  69. echo                       ┌───────────── COPY ─────────────┐
  70. echo                       │                                │
  71. echo                       │ Copying File_Handle's files... │
  72. echo                       │                                │
  73. echo                       └────────────────────────────────┘
  74.  
  75. echo                     >> %2\%3\INSTALL.LOG
  76. echo INSTALL.BAT copied: >> %2\%3\INSTALL.LOG
  77. echo                     >> %2\%3\INSTALL.LOG
  78. copy %1*.* %2\%3         >> %2\%3\INSTALL.LOG
  79. del  %2\%3\install.bat   >> %2\%3\INSTALL.LOG
  80. echo INSTALL.BAT deleted >> %2\%3\INSTALL.LOG
  81.  
  82. :   If the command failed, re-ask.
  83.  
  84. cls
  85. if not exist %2\%3\FH.EXE goto FH_PATH
  86. echo                 ┌────────── INSTALLATION COMPLETED ─────────┐
  87. echo                 │                                           │
  88. echo                 │ File_Handle is now installed on the disk. │
  89. echo                 │                                           │
  90. echo                 │ To evaluate File_Handle now, type:        │
  91. echo                 │                                           │
  92. echo                 │    FH and [ENTER]                         │
  93. echo                 │                                           │
  94. echo                 ├───────────────────────────────────────────┤
  95. echo                 │ Press PrintScreen to make a copy of this. │
  96. echo                 │                                           │
  97. echo                 │ Read the file REVIEW.TXT and the chapters │
  98. echo                 │ "Quick Start" and "Introduction" in  file │
  99. echo                 │ FH_MANUA.TXT.     F1 and Ctrl+F1 are long │
  100. echo                 │ and  short  Help; Alt+Letter is TOP menu, │
  101. echo                 │ Alt+Space BOTTOM menu.   Change colors by │
  102. echo                 │ Shift+Ctrl+F1 and then restarting FH.EXE. │
  103. echo                 │                                           │
  104. echo                 │ See READ_ME.1ST for "WHAT'S NEW" and last │
  105. echo                 │ minute changes not printed in the manual. │
  106. echo                 │                                           │
  107. echo                 │ CONFIG.SYS must have at least "files=10"! │
  108. echo                 │                                           │
  109. echo                 └───────────────────────────────────────────┘
  110. %2
  111. cd \%3
  112. goto FH_EXIT
  113.  
  114. :FH_ERROR
  115. cls
  116. echo  
  117. echo                        ┌─────────── ERROR ────────────┐
  118. echo                        │                              │
  119. echo                        │ The installation has failed! │
  120. echo                        │                              │
  121. echo                        └──────────────────────────────┘
  122.  
  123. :FH_PATH
  124. echo  
  125. echo           ┌───────────────────────── HELP ────────────────────────┐
  126. echo           │                                                       │
  127. echo           │ To install File_Handle from A: to C:\FH, type:        │
  128. echo           │                                                       │
  129. echo           │    [A:]INSTALL A: C: FH    (Notice: No '\' after C:!) │
  130. echo           │                                                       │
  131. echo           │ If your floppy or hard disk has another drive letter, │
  132. echo           │ use it's letter instead.                              │
  133. echo           │                                                       │
  134. echo           └───────────────────────────────────────────────────────┘
  135. echo  
  136. :FH_EXIT
  137.